<template>
	<view class="container" v-if="newsDetails!=null">
		<view class="title">{{newsDetails.title}}</view>
		<view class="info">
			<view class="time">发布时间：{{newsDetails.creatTime}}</view>
			<!-- <view class="author">作者：某某作者</view> -->
		</view>
		<view class="content">
			<u-parse :content="newsDetails.content"></u-parse>
		</view>

	</view>
</template>

<script>
	import api from '@/api/api.js';
	export default {
		name: '',
		components: {},
		data() {
			return {
				id:null,
				newsDetails:null
			}
		},
		onLoad(option) {
			this.id=option.id
		},
		created() {
			this.getDetails()
		},
		mounted() {},
		destroyed() {},
		methods: {
			getDetails(){
				let data={
					id:this.id,
				}
				api.getNoticeDetails(data).then(res => {
					if(res.data.code==200){
						this.newsDetails=res.data.data
					}
				})
			}
		}
	}
</script>
<style lang="scss">
	page {
		background-color: #FFFFFF;
	}
</style>
<style lang="scss" scoped>
	.container{
		width: calc(100% - 32rpx) ;
		overflow: hidden;
		padding: 16rpx;
	}
	.title {
		font-size: 36rpx;
		font-weight: bold;
		color: #333333;
		width: 100%;
		text-align: center;
		// height: 80rpx;
		line-height: 80rpx;
	}

	.info {
		font-size: 24rpx;
		font-weight: normal;
		color: #999999;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 32rpx 0;
		.time{
			margin-right: 8rpx;
		}
		.author{
			margin-left: 8rpx;
		}
	}

	.content {
		padding: 0rpx 16rpx;
		font-size: 28rpx;
		font-weight: normal;
		color: #333333;
	}
</style>
